package connect4swt.gui;


import org.eclipse.swt.graphics.*;


/**
 * @author  Joel Cordeiro
 */
public abstract class Piece {
		
	
	public Piece(int x, int y, int width, int height, Point position) {
		this.x = x;
		this.y = y;
		this.width = width;
		this.height = height;		
		this.position = position;		
		this.setBoardPositionX(position.x);
		this.setBoardPositionY(position.y);		
	}	

	public abstract boolean isEmpty();
	
	/**
	 * @return
	 * @uml.property  name="x"
	 */
	public int getX() {
		return x;
	}
	
	/**
	 * @param x
	 * @uml.property  name="x"
	 */
	public void setX(int x) {
		this.x = x;
	}
	
	/**
	 * @return
	 * @uml.property  name="y"
	 */
	public int getY() {
		return y;
	}
	
	/**
	 * @param y
	 * @uml.property  name="y"
	 */
	public void setY(int y) {
		this.y = y;
	}

	/**
	 * @return
	 * @uml.property  name="image"
	 */
	public Image getImage() {
		return image;
	}
		

	/**
	 * @param width
	 * @uml.property  name="width"
	 */
	public void setWidth(int width) {
		this.width = width;
	}

	/**
	 * @return
	 * @uml.property  name="width"
	 */
	public int getWidth() {
		return width;
	}

	/**
	 * @param height
	 * @uml.property  name="height"
	 */
	public void setHeight(int height) {
		this.height = height;
	}

	/**
	 * @return
	 * @uml.property  name="height"
	 */
	public int getHeight() {
		return height;
	}

	/**
	 * @param position
	 * @uml.property  name="position"
	 */
	public void setPosition(Point position) {
		this.position = position;
	}

	/**
	 * @return
	 * @uml.property  name="position"
	 */
	public Point getPosition() {
		return position;
	}
	
	/**
	 * @return
	 * @uml.property  name="boardPositionX"
	 */
	public int getBoardPositionX() {
		return boardPositionX;
	}

	/**
	 * @param boardPositionX
	 * @uml.property  name="boardPositionX"
	 */
	public void setBoardPositionX(int boardPositionX) {
		this.boardPositionX = boardPositionX;
	}

	/**
	 * @return
	 * @uml.property  name="boardPositionY"
	 */
	public int getBoardPositionY() {
		return boardPositionY;
	}

	/**
	 * @param boardPositionY
	 * @uml.property  name="boardPositionY"
	 */
	public void setBoardPositionY(int boardPositionY) {
		this.boardPositionY = boardPositionY;
	}	
	
	protected int x;
	protected int y;
	protected int width;
	protected int height;
	protected Point position;	
	protected Image image;
	protected int boardPositionX;
	protected int boardPositionY;
	
}
